package com.jiaz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiaz.entity.CheckIn;
import com.jiaz.entity.Postion;
import com.jiaz.pojo.ItemCheckInUser;
import com.jiaz.pojo.UserCheckInFreq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author jiajiazi
 * @version 1.0
 * @date 2022/4/23 18:09
 */

@Mapper
public interface CheckInMapper extends BaseMapper<CheckIn> {

    void insertByBatch(List<CheckIn> list);

    List<UserCheckInFreq> getUser_Postion_Freq();

    List<UserCheckInFreq> getUser_Postion_CheckIn();

    List<ItemCheckInUser> getPostion_User_CheckIn();

    List<Map<String,Object>> getCurrent_User_Postion_Freq(@Param("lat")double lat, @Param("lon")double lon, @Param("userId")int userId);

    void updateVenueByBatch(List<Postion> postions);

    List<UserCheckInFreq> getUser_Last_Postions();

}
